import React from 'react'
import routes from './routes'
import { BrowserRouter, Routes, Route } from 'react-router-dom'
type Props = {}

const index = (props: Props) => {
	return (
		<BrowserRouter>
			<Routes>
				{
					routes.length > 0 && routes.map((v, i) => {
						return <Route key={ i } path={ v.path } element={ <v.element></v.element> }></Route>
					})
				}
			</Routes>
		</BrowserRouter>
	)
}

export default index